<!--
 * @作者: kerwin
 * @公众号: 大前端私房菜
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        *{
            margin:0;
            padding:0;
        }
        div{
            height: 750px;
            /* 调整背景图片尺寸大小 */
            background-position: center;
            background-size: cover;
            /* 背景的固定 */
            background-attachment: fixed;
        }
        .box1{
            background-image: url(img/bg1.png);
        }
        .box2{
            background-image: url(img/bg2.png);
        }
        .box3{
            background-image: url(img/bg3.png);
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</body>
</html>